/*
========================================================================
 Name        : MMSMateContainerView.h
 Author      : 
 Copyright   : William Yu
 Description : 
========================================================================
*/
#ifndef MMSMATECONTAINERVIEW_H
#define MMSMATECONTAINERVIEW_H

#include <msvapi.h>                         // for MMsvSessionObserver 
#include <mmsclient.h>                      // for CMmsClientMtm
// [[[ begin generated region: do not modify [Generated Includes]
#include <aknview.h>
// ]]] end generated region [Generated Includes]


// [[[ begin [Event Handler Includes]
// ]]] end [Event Handler Includes]

// [[[ begin generated region: do not modify [Generated Forward Declarations]
class CMMSMateContainer;
// ]]] end generated region [Generated Forward Declarations]

// [[[ begin generated region: do not modify [Generated Constants]
// ]]] end generated region [Generated Constants]

#include "mmsengine.h"
/**
 * Avkon view class for MMSMateContainerView. It is register with the view server
 * by the AppUi. It owns the container control.
 * @class	CMMSMateContainerView MMSMateContainerView.h
 */
class CClientMtmRegistry;
class CMsvSession;

class CMMSMateContainerView : public CAknView
	{
public:
	// constructors and destructor
	CMMSMateContainerView();
	static CMMSMateContainerView* NewL();
	static CMMSMateContainerView* NewLC();        
	void ConstructL();
	virtual ~CMMSMateContainerView();

public:
	// from base class CAknView
	TUid Id() const;
	void HandleCommandL( TInt aCommand );
public: //from clientengine	
	void ClientEvent(const TDesC& aEventDescription);
	void ClientReceived(const TDesC8& aRevData);		
		//when all received		
	void ClientBodyReceived(const TDesC8& aBodyData);	
public:

private:    
	
protected:
	// from base class CAknView
	void DoActivateL(
		const TVwsViewId& aPrevViewId,
		TUid aCustomMessageId,
		const TDesC8& aCustomMessage);
	void DoDeactivate();
	void HandleStatusPaneSizeChange();
	
private:
	void SetupStatusPaneL();
	void CleanupStatusPane();
	// [[[ begin [Public Section]
public:
	CMMSMateContainer* CreateContainerL();
	// [[[ begin generated region: do not modify [Generated Methods]
public: 
	static TInt RunDataQuery1L( TDes& aData, TBool aUseDefaults = ETrue, const TDesC* aOverridePrompt = NULL );
	// ]]] end generated region [Generated Methods]
	
	
				
	// ]]] end [Public Section]
				
	// [[[ begin [Protected Section]
protected:
	// [[[ begin [Overridden Methods]
	// ]]] end [Overridden Methods]
	
	
	// [[[ begin [User Handlers]
protected: 
	TBool HandleStartMenuItemSelectedL( TInt aCommand );
	TBool HandleTestMenuItemSelectedL( TInt aCommand );
	TBool HandleRemyMenuItemSelectedL( TInt aCommand );
	// ]]] end [User Handlers]
	

	// ]]] end [Protected Section]

	// [[[ begin [Private Section]
private:
	// [[[ begin generated region: do not modify [Generated Instance Variables]
private: 
	CMMSMateContainer* iMMSMateContainer;
	// ]]] end generated region [Generated Instance Variables]

	// [[[ begin generated region: do not modify [Generated Methods]
	// ]]] end generated region [Generated Methods]
	
	// ]]] end [Private Section]
	void CreateMyMMS();
private:
    CMsvSession* iSession;          // Client session on the message server		
	enum TListQuery1Images
		{
		// [[[ begin generated region: do not modify [Generated Enums]
		// ]]] end generated region [Generated Enums]
		
		};
MMSEngine iMMSEngine;		
	};

#endif // MMSMATECONTAINERVIEW_H			
